package cn.java59;

import java.util.Scanner;

public class Homework6 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println("输入0-2之间的整数:");
		int num = sc.nextInt();
		for (;;) {
			if (num >= 0 && num <= 2) {
				switch (num) {
				case 0:
					System.out.println("你出的是石头");
					break;
				case 1:
					System.out.println("你出的是剪刀");
					break;
				case 2:
					System.out.println("你出的是布");
					break;
				default:

					break;
				}
				System.out.println("然后再问是否要继续出拳?(y/?)");
				String jx = sc.next();
				if (jx.equalsIgnoreCase("y")) {

				} else {
					break;
				}

			} else {
				System.out.println("请输入一个0到2之间的整数！");
			}

		}
		System.out.println("程序结束");
	}

}
